package com.example.weather.today

import android.util.Log
import android.util.SparseArray
import androidx.activity.viewModels
import com.alibaba.android.arouter.facade.annotation.Route
import com.example.library_base.base.BaseActivity
import com.example.library_base.router.WeatherRouterPath
import com.example.weather.BR
import com.example.weather.R
import dagger.hilt.android.AndroidEntryPoint
import javax.inject.Inject

@AndroidEntryPoint
@Route(path = WeatherRouterPath.WEATHER_TODAY_WEATHER)
class TodayWeatherActivity: BaseActivity(R.layout.activity_today_weather) {

    private val mViewModel by viewModels<TodayWeatherViewModel>()

    @Inject
    lateinit var inputModel: TodayWeatherInputModel

    @Inject
    lateinit var toadyEventHandler: TodayWeatherEventHandler

    override fun getVariableSparseArray(): SparseArray<Any> {
        val variables = SparseArray<Any>()
        variables.put(BR.todayViewModel, mViewModel)
        variables.put(BR.inputModel, inputModel)
        variables.put(BR.event, toadyEventHandler)
        return variables
    }

    override fun initView() {
        //Log.v("TAG", "============activity : $activityHash")
    }

    override fun requestData() {

    }
}